﻿@{
    ViewBag.Title = "Thiết lập hệ thống";
    Layout = "~/Views/Shared/_Layout.Management.cshtml";
}

<form method="post" class="form" action="/Management/SettingSettings">
	<fieldset id="firstStep">
		<h2 class="app">
	        <strong>Express - Thiết lập hệ thống</strong>
        </h2>
		<div class="errorMessage" data-bind="visible: InvalidateForm" >
			<span class="error">Xin hãy nhập thông tin bên dưới chính xác.</span>
		</div>				
		<div class="title">
			<h3>Thông tin hệ thống</h3>
		</div>
		<div id="editform" class="columns">
			<div class="col columnedit"> 
				<div class="row">
					<label>Tên trang:</label>
                    <input class="text" type="text" data-bind="value: SiteName, attr:{maxlength:250}" name="SiteName" />
				</div>
				<div class="row">
					<label>Nguồn trang:</label>
					<input class="text" type="text" data-bind="value: SiteSource, attr:{maxlength: 250}" name="SiteSource" />
                </div>                  
				<div class="row">
					<label>Tên bản đồ:</label>
					<input class="text" type="text" data-bind="value: MapName, attr:{maxlength:250}" name="MapName" />
                </div>             
				<div class="row">
					<label>Đường dẫn ảnh:</label>
					<input class="text" type="text" data-bind="value: MapImageURL, attr:{maxlength:250}" name="MapImageURL" />
                </div>          
				<div class="row">
					<label>Liên kết:</label>
					<input class="text" type="text" data-bind="value: MapLink, attr:{maxlength:500}" name="MapLink" />
                </div>
			</div>
		</div> 
		<div class="title">
			<h3>Đồng bộ hóa dữ liệu</h3>
		</div>
		<div id="editform" class="columns">
			<div class="col"> 
				<div class="row">
					<label>Đồng bộ danh mục:</label>
					<a href="#" class="btn btn-go" data-bind="click: SynchronizeCategory">Go</a>
				</div>
				<div class="row">
					<label class="error-desc" data-bind="visible: SyschronizeSuccess().length > 0, text: SyschronizeSuccess"></label>
                </div>
			</div>
            <div class="col">
				<div class="row">
					<label>Đồng bộ vùng/miền:</label>
					<a href="#" class="btn btn-go" data-bind="click: SynchronizeState">Go</a>
                </div>  
            </div>
		</div> 

        <!-- button below -->
		<div class="foot-info">
			<h3 class="centered-wbtn centered-wbtn-bottom save">
  				<span>
					<input type="button" class="btn btn-submit-page" data-bind="click: SubmitForm" value="Submit" />
                </span>
			</h3>
		</div>
	</fieldset>
</form>
<script type="text/javascript">
    var data = @(Html.Raw(Json.Encode(Model)));
</script>
<script src="/Scripts/ViewModel/SystemSetting.js" type="text/javascript"></script>